﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccessLibrary;
using DataAccessLibrary.DAL;
using entities;

namespace BusinessLogicLibrary.SearchModule
{
    public class Search
    {
        private SearchDAO dao ;

        public Search()
        {
            dao = new SearchDAO();
        }
        
        public List<RoomType> SearchByPrice(int minPrice, int maxPrice)
        {
            return dao.SearchByPrice(minPrice, maxPrice);
        }

        public List<RoomType> SearchByFeature(bool view, bool bath, bool balcony)
        {

            return dao.SearchByFeature(view, bath, balcony);
        }

        public List<RoomType> SearchByAll(int minPrice, int maxPrice, bool view, bool bath, bool balcony)
        {

            return dao.SearchByAll(minPrice, maxPrice, view, bath, balcony);

        }

        public List<vRoomInfo> getAvailableRoom(int roomTypeId, DateTime inDate, DateTime outDate)
        {
            return dao.getAvailableRoom(roomTypeId, inDate, outDate);
        }

        public List<int> getAvailableRoomID(int roomTypeId, DateTime inDate, DateTime outDate)
        {
            return dao.getAvailableRoomIdByRoomType(roomTypeId, inDate, outDate);
        }
    }
}
